﻿@model AerolineaApp.Models.Vuelo

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Vuelo</legend>

        @Html.HiddenFor(model => model.Id)
        <table id="tabla">
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.Ciudad_Origen)
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.EditorFor(model => model.Ciudad_Origen)
            @Html.ValidationMessageFor(model => model.Ciudad_Origen)
        </div>
        </td>
        </tr>
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.Ciudad_Destino)
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.EditorFor(model => model.Ciudad_Destino)
            @Html.ValidationMessageFor(model => model.Ciudad_Destino)
        </div>
        </td>
        </tr>
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.Fecha)
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.EditorFor(model => model.Fecha)
            @Html.ValidationMessageFor(model => model.Fecha)
        </div>
        </td>
        </tr>
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.Duracion)
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.EditorFor(model => model.Duracion)
            @Html.ValidationMessageFor(model => model.Duracion)
        </div>
        </td>
        </tr>
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.Asientos_Diponibles)
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.EditorFor(model => model.Asientos_Diponibles)
            @Html.ValidationMessageFor(model => model.Asientos_Diponibles)
        </div>
        </td>
        </tr>
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.Precio)
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.EditorFor(model => model.Precio)
            @Html.ValidationMessageFor(model => model.Precio)
        </div>
        </td>
        </tr>
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.AvionId, "Avion")
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.DropDownList("AvionId", String.Empty)
            @Html.ValidationMessageFor(model => model.AvionId)
        </div>
        </td>
        </tr>
        <tr>
        <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.AerolineaId, "Aerolinea")
        </div>
        </td>
        <td>
        <div class="editor-field">
            @Html.DropDownList("AerolineaId", String.Empty)
            @Html.ValidationMessageFor(model => model.AerolineaId)
        </div>
        </td>
        </tr>
        </table>
        <p>
            <input type="submit" value="Actualizar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
